@extends('layouts.master')

@section("css")
	@parent
@stop

@section("body")
<div class="row">
	<div class="col-md-12">
		<!-- INPUTS -->
		<div class="panel">
			<div class="panel-heading">
				<h3 class="panel-title">修改文章</h3>
			</div>
			<div class="panel-body">
				<input type="hidden" id="id" value="{{ $article['id'] }}">
				<div class="form-group">
				    <label class="sr-only" for="name">标题</label>
				    <input id="title" type="text" class="form-control" placeholder="请输入标题" value="{{ $article['title'] }}">
			    </div>
			    <div class="form-group">
				    <label class="sr-only" for="name">摘要</label>
				    <input id="abstract" type="text" class="form-control" placeholder="请输入摘要" value="{{ $article['abstract'] }}">
			    </div>
			    <div class="form-group">
				    <label class="sr-only" for="name">缩略图</label>
				    <div id="img-wrapper1" class="input_div">
                        <div class="img_div2" style="display: inherit-block;">
                            <img style="width: 200px;" id="cn_img1" src="{{ $article['cover'] }}">
                        </div>
                        <br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <div id="upload1_btn" class="upload_btn btn btn-primary">
                            上传缩略图
                        </div>
                        <input type="file" id="upload1" style="display:none">
                    </div>
			    </div>
			    <div class="form-group">
				    <label class="sr-only" for="name">文章内容</label>
				    <textarea id="content" class="form-control" placeholder="请输入文章内容" rows='5'>{{ $article['content'] }}</textarea>
			    </div>
				<button type="button" id="update_btn" class="btn btn-primary btn-block update_btn">修改文章</button>
			</div>
		</div>
		<!-- END INPUTS -->
	</div>
</div>
@stop

@section("js")
	@parent
	<script type="text/javascript" src="/lib/js/qiniu.min.js"></script>
    <script type="text/javascript" src="/lib/js/plupload.full.min.js"></script>
	<script type="text/javascript" src="/js/pages/admin/article/update.js"></script>
@stop